//
//  UIView+roundRect.m
//  BaxTer
//
//  Created by 陈武琦 on 16/9/9.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#import "UIView+roundRect.h"

@implementation UIView (roundRect)
- (void)cwq_cornerRadius:(CGFloat)r borderColor:(UIColor *)color borderWidth:(CGFloat)width {

    if (r <= 0) {
        return;
    }
    if (!color) {
        color = [UIColor clearColor];
    }
    
    if (width <= 0) {
        width = 0;
    }
    self.layer.cornerRadius = r;
    self.layer.borderColor = color.CGColor;
    self.layer.borderWidth = width;
    self.layer.masksToBounds = YES;

}
@end
